import Service from './$axios'
import { lotAuth } from '../../config'
//登录
export const queryUserById = (id) => {    
    return Service({
        url: lotAuth +'/queryUserById?userId='+id,
		method: 'get'
    })
}

//根据库房id查询所有的区域信息
export const findAllRegionById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/findAllRegion?id='+id,
		method: 'get'
    })
}
//根据区域id查询所有的货架
export const findAllShelvesById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/findAllShelves?id='+id,
		method: 'get'
    })
}
//根据货架id查询所有的储位
export const findStorageById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/findStorage?id='+id,
		method: 'get'
    })
}
//根据id查询库房详情
export const depotListById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/depotList?id='+id,
		method: 'get'
    })
}
//根据id查询区域详情
export const findRegionDetailById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/findRegionDetail?id='+id,
		method: 'get'
    })
}
//根据id查询货架详情
export const findShelvesDetailById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/findShelvesDetail?id='+id,
		method: 'get'
    })
}
//根据id删除库房
export const deleteDepotlById = (id) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/deleteDepot?id='+id,
		method: 'delete'
    })
}
//根据id删除区域
export const deleteRegionlById = (id,treeId) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/deleteRegion?id='+id+'&treeId='+treeId,
		method: 'delete'
    })
}
//根据id删除货架
export const deleteShelevslById = (id,treeId) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/deleteShelves?id='+id+'&treeId='+treeId,
		method: 'delete'
    })
}
//根据id删除储位
export const deleteStoragelById = (id,treeId) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/deleteStorage?id='+id+'&treeId='+treeId,
		method: 'delete'
    })
}

//新增库房
export const addDepot = (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/addDepot',
        method: 'post',
        data:data
    })
}
//修改库房
export const updateDepotManagement= (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/updateDepotManagement',
        method: 'put',
        data:data
    })
}
//新增区域
export const addRegion = (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/addRegion',
        method: 'post',
        data:data
    })
}
//修改区域
export const updateRegion= (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/updateRegion',
        method: 'post',
        data:data
    })
}

//新增货架
export const addShelves = (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/addShelves',
        method: 'post',
        data:data
    })
}
//修改货架
export const updateShelves= (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/updateShelves',
        method: 'post',
        data:data
    })
}

//新增储位
export const addStorage = (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/addStorage',
        method: 'post',
        data:data
    })
}
//修改储位
export const updateStorage = (data) => {    
    return Service({
        url: '/gd-wms-base/depotManagement/updateStorage',
        method: 'post',
        data:data
    })
}